﻿@model CRMExam.Models.CreateContactsViewModel

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>CreateContactsViewModel</h4>
        <hr />
        @Html.ValidationSummary(true)

        <div class="form-group">
            @Html.LabelFor(model => model.Name, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.StreetName, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.StreetName)
                @Html.ValidationMessageFor(model => model.StreetName)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ZipCode, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ZipCode)
                @Html.ValidationMessageFor(model => model.ZipCode)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.City, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.City)
                @Html.ValidationMessageFor(model => model.City)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Country, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Country)
                @Html.ValidationMessageFor(model => model.Country)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.WorkPhone, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.WorkPhone)
                @Html.ValidationMessageFor(model => model.WorkPhone)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.MobilePhone, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.MobilePhone)
                @Html.ValidationMessageFor(model => model.MobilePhone)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Email, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Email)
                @Html.ValidationMessageFor(model => model.Email)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Picture, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Picture)
                @Html.ValidationMessageFor(model => model.Picture)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.JobTitle, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.JobTitle)
                @Html.ValidationMessageFor(model => model.JobTitle)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Web, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Web)
                @Html.ValidationMessageFor(model => model.Web)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Description, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Newsletter, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Newsletter)
                @Html.ValidationMessageFor(model => model.Newsletter)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.AspNetUsersId, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.AspNetUsersId)
                @Html.ValidationMessageFor(model => model.AspNetUsersId)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CompanyId, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.CompanyId)
                @Html.ValidationMessageFor(model => model.CompanyId)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
